{% extends "admin/base_site.html" %}
{% load i18n admin_urls static admin_modify %}

{% block extrastyle %}
    {{ block.super }}
    <link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">
{% endblock %}

{% block coltype %}colM{% endblock %}

{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
&rsaquo; <a href="{% url 'admin:grading_repository_changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
&rsaquo; {% translate 'Change Branch' %}
</div>
{% endblock %}

{% block content %}
<div id="content-main">
    <form method="post" id="{{ opts.model_name }}_form" novalidate>
        {% csrf_token %}
        <fieldset class="module aligned">
            <div class="form-row">
                <div class="field-box">
                    <label for="branch">{% translate 'Branch' %}:</label>
                    <select name="branch" id="branch">
                        {% for branch in branches %}
                            <option value="{{ branch }}" {% if branch == current_branch %}selected{% endif %}>
                                {{ branch }}
                            </option>
                        {% endfor %}
                    </select>
                </div>
            </div>
        </fieldset>
        <div class="submit-row">
            <input type="submit" value="{% translate 'Change Branch' %}" class="default">
            <a href="{% url 'admin:grading_repository_changelist' %}" class="button cancel-link">{% translate 'Cancel' %}</a>
        </div>
    </form>
</div>
{% endblock %}

{% block extrahead %}
    {{ block.super }}
    <style>
        .field-box {
            margin-bottom: 15px;
        }
        .field-box label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        .field-box select {
            width: 100%;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
    </style>
{% endblock %}
